package com.example.service;

import com.example.dao.TagDao;
import com.example.model.pojo.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description //TODO
 * @Date 2022/9/14 14:41
 * @Author lonng
 **/
@Service
public class TagServiceImpl implements TagService{
    @Autowired
    private TagDao tagDao;
    @Override
    public List<Tag> findAll() {
        return tagDao.findAll();
    }

    @Override
    public Tag findAllByName(String tName) {
        return tagDao.findAllByName(tName);
    }

    @Override
    public String findByIdGetName(Integer id) {
        return tagDao.findByIds(id).getName();
    }
}
